import request from "@/axios/request";
import url from "@/axios/url";
const { mesUrl, adminUrl } = url();
// 导出url
export const exportUrl = `${mesUrl}mesPmJtManager/export`;
// 分页查询
export function getList(params = {}) {
  return request({
    url: `${mesUrl}mesPmJtManager`,
    method: "get",
    params,
  });
}
// 新增
export function rowCreate(data = {}) {
  return request({
    url: `${mesUrl}mesPmJtManager`,
    method: "post",
    data,
  });
}
// 修改
export function rowUpdate(data = {}) {
  return request({
    url: `${mesUrl}mesPmJtManager`,
    method: "put",
    data,
  });
}
// 删除
export function rowDel(id) {
  return request({
    url: `${mesUrl}mesPmJtManager/${id}`,
    method: "put",
  });
}
// 详情
export function rowDetail(id) {
  return request({
    url: `${mesUrl}mesPmJtManager/info/${id}`,
    method: "get",
  });
}

// 查询产品列表
export function getGoodsList(data = {}) {
  return request({
    url: `${adminUrl}baseGoods/list`,
    method: "get",
    data,
  });
}

// 查询线体列表
export function getLineCodeList(params) {
  return request({
    url: `${adminUrl}baseFactoryModeling/children`,
    method: "get",
    params,
  });
}
// 查询停机状态列表
export function getStopStatusList() {
  return request({
    url: `${adminUrl}dict/type/stop_Status`,
    method: "get",
  });
}

// 查询工厂编码列表
export function getFactoryCodeList() {
  return request({
    url: `${adminUrl}baseFactoryModeling/select?level=3`,
    method: "get",
  });
}

// 查询停机类型：数据字典
export function getStopTypeList() {
  return request({
    url: `${adminUrl}dict/type/stop_type`,
    method: "get",
  });
}

// 是否通用
export function getIsCommonList() {
  return request({
    url: `${adminUrl}dict/type/yes_or_not`,
    method: "get",
  });
}
